package com.yunhaikeji.api.module.person.controller;

import com.yunhaikeji.api.common.BaseController;
import com.yunhaikeji.api.module.person.entity.Person;
import com.yunhaikeji.api.module.person.service.IPersonService;
import com.yunhaikeji.core.web.ProcessResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * 上报人员、施工人员管理
 */
@RestController
@RequestMapping("/person")
@Api(value = "人员管理", tags = "人员管理")
public class PersonController<T extends Person> extends BaseController {
    @Autowired
    private IPersonService<Person> service;

    @ApiOperation("添加/修改人员")
    @PostMapping("/save")
    public ProcessResult save(@RequestBody Person person) {
        service.saveEntity(person);

        return ProcessResult.success();
    }


}
